package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.entity.Columns;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface ColumnsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Columns record);

    int insertSelective(Columns record);

    Columns selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Columns record);

    int updateByPrimaryKey(Columns record);

    int updateDeletedById(@Param("updatedDeleted") Byte updatedDeleted, @Param("id") Long id);

    List<Columns> findAllPage(PageReq req);

    List<Columns> findAllNotDeleted();

    List<Columns> findAllByIds(@Param("ids") List<Long> ids);

    int updateCourseCountById(@Param("updatedCourseCount") Integer updatedCourseCount, @Param("id") Long id);

    int updateStudyCountById(@Param("updatedStudyCount") Long updatedStudyCount, @Param("id") Long id);

    List<Columns> findAllByHomeDisplayAndDeletedAndStatus(@Param("homeDisplay")Byte homeDisplay,@Param("deleted")Byte deleted,@Param("status")Byte status);

}